package com.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity{

	Button ok_btn;
	Button item;
	Button exit;
	EditText input_text;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		ok_btn =(Button)findViewById(R.id.ok_btn);
		item=(Button)findViewById(R.id.itemBtn);
		exit=(Button)findViewById(R.id.exit_btn);
		input_text =(EditText)findViewById(R.id.editText1);
		
		exit.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Toast.makeText(MainActivity.this, "exit", Toast.LENGTH_SHORT).show();
			}
		});
		
		item.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Toast.makeText(MainActivity.this, "item", Toast.LENGTH_SHORT).show();
			}
		});
		
		ok_btn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Toast.makeText(MainActivity.this, input_text.getText().toString(), Toast.LENGTH_SHORT).show();			
			}
		});
	}

}
